<?php

class m120527_100839_sucreate_bscription_table extends CDbMigration {
    public function up() {
        $this->createTable('subscription', array(
            'id' => 'pk',
            'email' => 'string not NULL',
            'create_time' => 'datetime default null',
        ));
        $this->createIndex('unique_mail', 'subscription', 'email', true);
    }

    public function down() {
        $this->dropIndex('unique_mail', 'subscription');
        $this->dropTable('subscription');
    }
}